<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'updateroom.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript"> 			
				function add(){								
				var uname = document.getElementById("ccName").value;		
				if(uname == null||uname == ""){				
					document.getElementById("name_msg").innerHTML = "*机房名不能为空";
					 return false;
				}else{
					document.getElementById("name_msg").innerHTML = "";
				}				
			  
			}
		</script>
  </head>
  
  <body>
  <FORM name="myForm" method="post" action="room/addRoom.action" onsubmit="return add()">
  <div id="content_right">
			<TABLE class=table cellSpacing=1>
				<TBODY>						  				
					<tr>
						<TD vAlign=center align=left>
							机房名称
						</TD>
						<TD>
						    <input type="text" id="ccName" name="ccName" value="" onblur="add()">
						</TD>
				     <td><font id="name_msg" color="red" size="2"></font></td>
					</tr>	
					<tr>
						<TD vAlign=center align=left>
							所属部门编号
						</TD>						
						<td class="tb_mid1">
							<select name="department">								
								<s:iterator value="list01" var="li01">
									
										<option value="${li01.deptId}">
											<s:property value="#li01.deptId" />
										</option>
								
								</s:iterator>
							</select>
						</td>
					</tr>	
					<tr>
						<TD vAlign=center align=left>
							负责人编号
						</TD>						
						<td class="tb_mid1">
							<select name="employee">								
								<s:iterator value="list02" var="li02">
									
										<option value="${li02.empId}">
											<s:property value="#li02.empId" />
										</option>
									
								</s:iterator>
							</select>
						</td>
					</tr>
					<tr>
						<TD vAlign=center align=left>
							地址
						</TD>
						<TD>
						    <input type="text" name="ccAddr" value="">
						</TD>
                    </tr>
                    <tr>
						<TD vAlign=center align=left>
							备注
						</TD>
						<TD>
						    <input type="text" name="ccRemark" value="">
						</TD>
			        </tr>
				</TBODY>
			</TABLE>
			<p align="center">
						<!--<font color="red">${msg5}</font>  -->
				
						<input type="submit" value="保存">
						&nbsp;&nbsp;&nbsp;
						<input type="reset" value="全部重写">
					</p>
					</div>
		</FORM>
  </body>
</html>